Ext.define("app.widget.value", {
	extend : 'Ext.form.ComboBox',
	alias : 'widget.valueWidget',
	initComponent : function() {
		var me = this;
		var store = me.addStore();
		Ext.apply(me, {
			valueField : me.valueField || 'value',
			displayField : me.displayField || 'displayName',
			queryMode : me.queryMode || 'local',
			store : store
		});
		me.callParent(arguments);
	},
	addStore : function() {
		var me = this;
		var datas = utils.getValue('t' + me.valueType);
		var method = me.func;
		if (method) {
			datas = method.call(me.parentTarget, datas);
		}
		var store = Ext.create('Ext.data.Store', {
			fields : [ 'value', 'displayName' ],
			data : datas
		});
		return store;
	}
});